package cc.loac.heba.pojo;


import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;
import java.util.List;

public class Hei {
    private Integer heiId;
    private String title;
    private String content;
    @JSONField(format ="yyyy-MM-dd kk:mm:ss")
    private Date createTime;
    private Integer views;
    private String email;
    private Integer likes;
    private Integer collections;
    private Integer comments;
    private Integer status;
    private List<HeiImage> images;

    // 以下是 User 字段
    private String username;
    private String avatar;
    private String schoolName;

    // 以下标记当前文章是否是当前用户喜欢/收藏
    private Boolean like;
    private Boolean collect;


    public final static Integer STATUS_DRAFT = 0;
    public final static Integer STATUS_PUBLIC = 1;

    public Integer getHeiId() {
        return heiId;
    }

    public void setHeiId(Integer heiId) {
        this.heiId = heiId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public Integer getViews() {
        return views;
    }

    public void setViews(Integer views) {
        this.views = views;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getLikes() {
        return likes;
    }

    public void setLikes(Integer likes) {
        this.likes = likes;
    }

    public Integer getCollections() {
        return collections;
    }

    public void setCollections(Integer collections) {
        this.collections = collections;
    }

    public Integer getComments() {
        return comments;
    }

    public void setComments(Integer comments) {
        this.comments = comments;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public List<HeiImage> getImages() {
        return images;
    }

    public void setImages(List<HeiImage> images) {
        this.images = images;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Boolean getLike() {
        return like;
    }

    public void setLike(Boolean like) {
        this.like = like;
    }

    public Boolean getCollect() {
        return collect;
    }

    public void setCollect(Boolean collect) {
        this.collect = collect;
    }

    @Override
    public String toString() {
        return "Hei{" +
                "heiId=" + heiId +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", createTime=" + createTime +
                ", schoolName='" + schoolName + '\'' +
                ", views=" + views +
                ", email='" + email + '\'' +
                ", likes=" + likes +
                ", collections=" + collections +
                ", comments=" + comments +
                ", status=" + status +
                ", images=" + images +
                ", username='" + username + '\'' +
                ", avatar='" + avatar + '\'' +
                ", like=" + like +
                ", collect=" + collect +
                '}';
    }
}
